﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MessageShark;
using Phoenix.ZeroMQConnectors;
using PServiceBus.Gateway.Interfaces.Commands;
using PServiceBus.Gateway.Interfaces.DTO;

namespace PServiceBus.Services.Gateway.Runtime {
    public class SerializationBootstrapper {
        public static void Configure() {
            if (!MessageSharkSerializer.IsTypeRegisterFor<MessageBase>(typeof(BusMessage)))
                MessageSharkSerializer.RegisterTypeFor<MessageBase>(typeof(BusMessage), 1);
            if (!MessageSharkSerializer.IsTypeRegisterFor<MessageBase>(typeof(RouterMessage)))
                MessageSharkSerializer.RegisterTypeFor<MessageBase>(typeof(RouterMessage), 2);
        }
    }
}
